#!/usr/bin/env python
# encoding: utf-8

"""
@version: python3.7
@Author  : huangyi
@contact:  hy.dazui@qq.com
@Time    : 2020/1/13 2:03
@Describe: add Describe here
"""
from app.ast.ast import Ast
from app.expression.context import Context
from app.scanner.scanner import Scanner

if __name__ == '__main__':
    # expression = "(1+2*3-4)/1.5"
    expression = "0 || 0"
    token_list = Scanner().scan(expression)
    expression = Ast().parse(token_list)
    if expression:
        print(expression.interpret(Context()))
    else:
        print("not expression")
